import axios from '@/utils/http'

// 删除商品
export function delGoods(params: any) {
  return axios({
    url: '/goods/del',
    method: 'get',
    params: params
  })
}
// 新增商品
export function addGoods(params: any) {
  return axios({
    url: '/goods/add',
    method: 'post',
    params: params
  })
}
// 修改商品
export function updGoods(params: any) {
  return axios({
    url: '/goods/update',
    method: 'post',
    params: params
  })
}
//根据id获取商品
export function getById(params: any) {
  return axios({
    url: '/goods/getById',
    method: 'get',
    params: params
  })
}
//首页获取今日特价和热卖推荐
export function getPromotionGoods(params: any) {
  return axios({
    url: '/goods/getPromotionGoods',
    method: 'get',
    params: params
  })
}

// 分页条件查询商品
export function getListPage(params: any) {
  return axios({
    url: '/goods/getListPage',
    method: 'get',
    params: params
  })
}


